package or.exa.cangguan.mapper;

import or.exa.cangguan.common.Page;
import or.exa.cangguan.entity.dto.GoodsPlaceDto;
import or.exa.cangguan.entity.po.GoodsPlace;
import or.exa.cangguan.entity.vo.GoodsPlaceVo;
import or.exa.cangguan.entity.vo.GoodsVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface GoodsPlaceMapper {
    int deleteByPrimaryKey(Integer id);

    Integer selectCount(@Param("storeId") Integer storeId,
                        @Param("shelfId") Integer shelfId,
                        @Param("goodsId") Integer goodsId);

    Integer selectFreezeCount(@Param("storeId") Integer storeId,
                        @Param("shelfId") Integer shelfId,
                        @Param("goodsId") Integer goodsId);


    Integer selectCountByCondition(@Param("storeId") Integer storeId,
                                 @Param("goodsId") Integer goodsId);

    GoodsPlace selectByCondition(@Param("storeId") Integer storeId,
                                       @Param("shelfId") Integer shelfId,
                                       @Param("goodsId") Integer goodsId);
    List<GoodsPlace> selectByConditionList(@Param("storeId") Integer storeId,
                                 @Param("shelfId") Integer shelfId,
                                 @Param("goodsId") Integer goodsId);

    List<GoodsPlaceDto> selectAll(@Param("goodsPlaceVo") GoodsPlaceVo goodsPlaceVo
                                    , @Param("page") Page page);

    Integer selectAllCount(GoodsPlaceVo goodsPlaceVo);

    int insert(GoodsPlace record);

    int insertSelective(GoodsPlace record);

    GoodsPlace selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(GoodsPlace record);

    int updateByPrimaryKey(GoodsPlace record);
}